package com.ssy.lingxi.order.model.vo.buyer.request;

import com.ssy.lingxi.order.handler.annotation.InvoiceKindAnnotation;
import com.ssy.lingxi.order.handler.annotation.InvoiceTypeAnnotation;
import com.ssy.lingxi.order.model.vo.basic.request.OrderIdVO;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;

/**
 * 采购订单详情申请开票请求参数
 * @author wyx
 * @version 2.0.0
 * @date 2021-11-25
 */
@Setter
@Getter
public class BuyerApplyInvoiceVO extends OrderIdVO {
    private static final long serialVersionUID = 875419602130779649L;
    /**
     * 发票Id
     */
    @NotNull(message = "发票Id要大于0")
    @Positive(message = "发票Id要大于0")
    private Long invoiceId;

    /**
     * 发票种类，1.增值税普通发票（默认） 2.增值税专用发票
     */
    @NotNull(message = "发票种类不能为空")
    @InvoiceKindAnnotation
    private Integer invoiceKind;

    /**
     * 发票类型，1.企业（默认） 2.个人
     */
    @NotNull(message = "发票类型不能为空")
    @InvoiceTypeAnnotation
    private Integer invoiceType;

    /**
     * 发票台头
     */
    @NotBlank(message = "发票台头不能为空")
    @Size(max = 200, message = "发票台头最长200个字符")
    private String title;

    /**
     * 纳税号
     */
    @Size(max = 50, message = "发票纳税号最长50个字符")
    private String taxNo;

    /**
     * 开户银行
     */
    @Size(max = 200, message = "开户银行最长200个字符")
    private String bank;

    /**
     * 账号
     */
    @Size(max = 50, message = "账号最长50个字符")
    private String account;

    /**
     * 地址
     */
    @Size(max = 200, message = "发票地址最长200个字符")
    private String address;

    /**
     * 电话
     */
    @Size(max = 20, message = "发票电话最长20个字符")
    private String phone;
}
